// compile: g++ -o for_range for_range.cc -std=c++11
// run: ./for_range
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;

void Test1() {
  vector<int> v{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  for (const auto& t : v) {
    cout << t << " ";
  }
  cout << endl;
}
void Test2() {
  unordered_map<string, string> ump;
  ump["key1"] = "value1";
  ump["key2"] = "value2";
  for (const auto& t : ump) {
    cout << t.first << " " << t.second << endl;
  }
  cout << endl;
}
int main() {
  Test1();
  Test2();
  return 0;
}
